package com.ruoyi.community.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;

/**
 * 行政区域对象 region
 * 
 * @author lj
 * @date 2022-02-22
 */
@ApiModel(value = "行政区域表")
public class Region extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    @ApiModelProperty(value = "ID")
    private Long id;

    /** 父ID */
    @ApiModelProperty(value = "父ID")
    @Excel(name = "父ID")
    private Integer pid;

    /** 名称 */
    @ApiModelProperty(value = "名称")
    @Excel(name = "名称")
    private String name;

    /** 类型 */
    @ApiModelProperty(value = "类型,字典:region_type")
    @Excel(name = "类型")
    private Integer type;

    /** 编码 */
    @ApiModelProperty(value = "编码")
    @Excel(name = "编码")
    private Integer code;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setPid(Integer pid) 
    {
        this.pid = pid;
    }

    public Integer getPid() 
    {
        return pid;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setCode(Integer code) 
    {
        this.code = code;
    }

    public Integer getCode() 
    {
        return code;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pid", getPid())
            .append("name", getName())
            .append("type", getType())
            .append("code", getCode())
            .toString();
    }
}
